<?php
/**
 * Created by Forever.
 * User: Forever
 * Date: 2018/10/03
 * Time: 上午 10:39
 */
namespace app\api\validate;
use think\Validate;
use \think\Db;
class User extends Validate{
    // 验证规则
    protected $rule = [
        ['id','require','-10011'],
        ['name','require','-10012'],
        ['type','require','-10016'],
        ['openid','require','-10008'],
        ['shop_id','require','-10032'],
        ['phone','require','-10033'],
        ['validate_code','require','-10034'],



        ['encryptData','require','-10004'],

    ];

    /*验证的名字*/
    protected $scene = [
        'detail'=>['id'],
        'role'=>['shop_id'],
        'shop'=>['name'],
        'user_center'=>['type','openid'],
        'validate'=>['phone','validate_code'],
    ];


    /**函数判断
     * [checkData description]
     * @param  [type] $value [description]
     * @param  [type] $rule  [description]
     * @param  [type] $data  [description]
     * @return [type]        [description]
     */
    protected function checkGrowth($value,$rule,$data){
        return true;
    }


}
